<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>ESP8266_RTOS_SDK: Station APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266_RTOS_SDK
   &#160;<span id="projectnumber">v1.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Station APIs<div class="ingroups"><a class="el" href="group__WiFi__APIs.html">WiFi Related APIs</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>ESP8266 station APIs.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structstation__config.html">station_config</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structscan__config.html">scan_config</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbss__info.html">bss_info</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga953373c37a80c04a576ac03986a1ebfb"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga953373c37a80c04a576ac03986a1ebfb">scan_done_cb_t</a>) (void *arg, STATUS status)</td></tr>
<tr class="memdesc:ga953373c37a80c04a576ac03986a1ebfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function for wifi_station_scan.  <a href="#ga953373c37a80c04a576ac03986a1ebfb">More...</a><br /></td></tr>
<tr class="separator:ga953373c37a80c04a576ac03986a1ebfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga4c23fd73def991ebbce2a16bf7d474bc"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga4c23fd73def991ebbce2a16bf7d474bc">STATION_STATUS</a> { <br />
&#160;&#160;<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bca27894ff65729ce4cf0a322e2e3a71c04">STATION_IDLE</a> = 0, 
<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bcaff0fbe033edf483a60063bdfcf1e39b9">STATION_CONNECTING</a>, 
<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bcaa9d77c934ee5b916f3ff0743204f3d7a">STATION_WRONG_PASSWORD</a>, 
<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bca95a3d4b77c93e76281ff5355f24acfd0">STATION_NO_AP_FOUND</a>, 
<br />
&#160;&#160;<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bca25d788a7722116d2bf2b26bb6402d118">STATION_CONNECT_FAIL</a>, 
<a class="el" href="group__Station__APIs.html#gga4c23fd73def991ebbce2a16bf7d474bca6df279173c26c3e7b1c65fdd41b50889">STATION_GOT_IP</a>
<br />
 }<tr class="separator:ga4c23fd73def991ebbce2a16bf7d474bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga1f0be53caaf81058292a1e6559bdaa36"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga1f0be53caaf81058292a1e6559bdaa36">wifi_station_get_config</a> (struct <a class="el" href="structstation__config.html">station_config</a> *config)</td></tr>
<tr class="memdesc:ga1f0be53caaf81058292a1e6559bdaa36"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current configuration of the ESP8266 WiFi station.  <a href="#ga1f0be53caaf81058292a1e6559bdaa36">More...</a><br /></td></tr>
<tr class="separator:ga1f0be53caaf81058292a1e6559bdaa36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6731bedbb516f8709c236084fa721dd4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga6731bedbb516f8709c236084fa721dd4">wifi_station_get_config_default</a> (struct <a class="el" href="structstation__config.html">station_config</a> *config)</td></tr>
<tr class="memdesc:ga6731bedbb516f8709c236084fa721dd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the configuration parameters saved in the Flash of the ESP8266 WiFi station.  <a href="#ga6731bedbb516f8709c236084fa721dd4">More...</a><br /></td></tr>
<tr class="separator:ga6731bedbb516f8709c236084fa721dd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab3699b2e258bf21ad6e85e4b1ec1c271"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gab3699b2e258bf21ad6e85e4b1ec1c271">wifi_station_set_config</a> (struct <a class="el" href="structstation__config.html">station_config</a> *config)</td></tr>
<tr class="memdesc:gab3699b2e258bf21ad6e85e4b1ec1c271"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the configuration of the ESP8266 station and save it to the Flash.  <a href="#gab3699b2e258bf21ad6e85e4b1ec1c271">More...</a><br /></td></tr>
<tr class="separator:gab3699b2e258bf21ad6e85e4b1ec1c271"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafd1188add491eee183d4ee2daa37dca6"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gafd1188add491eee183d4ee2daa37dca6">wifi_station_set_config_current</a> (struct <a class="el" href="structstation__config.html">station_config</a> *config)</td></tr>
<tr class="memdesc:gafd1188add491eee183d4ee2daa37dca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the configuration of the ESP8266 station. And the configuration will not be saved to the Flash.  <a href="#gafd1188add491eee183d4ee2daa37dca6">More...</a><br /></td></tr>
<tr class="separator:gafd1188add491eee183d4ee2daa37dca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab03cd1e7e4ad93cd241c94bd57430384"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gab03cd1e7e4ad93cd241c94bd57430384">wifi_station_connect</a> (void)</td></tr>
<tr class="memdesc:gab03cd1e7e4ad93cd241c94bd57430384"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect the ESP8266 WiFi station to the AP.  <a href="#gab03cd1e7e4ad93cd241c94bd57430384">More...</a><br /></td></tr>
<tr class="separator:gab03cd1e7e4ad93cd241c94bd57430384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaba69e9646b1f29d8a72972787400f4f1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gaba69e9646b1f29d8a72972787400f4f1">wifi_station_disconnect</a> (void)</td></tr>
<tr class="memdesc:gaba69e9646b1f29d8a72972787400f4f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect the ESP8266 WiFi station from the AP.  <a href="#gaba69e9646b1f29d8a72972787400f4f1">More...</a><br /></td></tr>
<tr class="separator:gaba69e9646b1f29d8a72972787400f4f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac80b0607b1cb20c161c681581c998626"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gac80b0607b1cb20c161c681581c998626">wifi_station_scan</a> (struct <a class="el" href="structscan__config.html">scan_config</a> *config, <a class="el" href="group__Station__APIs.html#ga953373c37a80c04a576ac03986a1ebfb">scan_done_cb_t</a> cb)</td></tr>
<tr class="memdesc:gac80b0607b1cb20c161c681581c998626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scan all available APs.  <a href="#gac80b0607b1cb20c161c681581c998626">More...</a><br /></td></tr>
<tr class="separator:gac80b0607b1cb20c161c681581c998626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00570be3792df2117fabaf78f1715377"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga00570be3792df2117fabaf78f1715377">wifi_station_get_auto_connect</a> (void)</td></tr>
<tr class="memdesc:ga00570be3792df2117fabaf78f1715377"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the ESP8266 station will connect to the recorded AP automatically when the power is on.  <a href="#ga00570be3792df2117fabaf78f1715377">More...</a><br /></td></tr>
<tr class="separator:ga00570be3792df2117fabaf78f1715377"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga814fa9c0218cd4c1df29b4d22aeef442"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga814fa9c0218cd4c1df29b4d22aeef442">wifi_station_set_auto_connect</a> (bool set)</td></tr>
<tr class="memdesc:ga814fa9c0218cd4c1df29b4d22aeef442"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set whether the ESP8266 station will connect to the recorded AP automatically when the power is on. It will do so by default.  <a href="#ga814fa9c0218cd4c1df29b4d22aeef442">More...</a><br /></td></tr>
<tr class="separator:ga814fa9c0218cd4c1df29b4d22aeef442"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga31710ba9a7d42a9503a33149fa0b06e8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga31710ba9a7d42a9503a33149fa0b06e8">wifi_station_get_reconnect_policy</a> (void)</td></tr>
<tr class="memdesc:ga31710ba9a7d42a9503a33149fa0b06e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the ESP8266 station will reconnect to the AP after disconnection.  <a href="#ga31710ba9a7d42a9503a33149fa0b06e8">More...</a><br /></td></tr>
<tr class="separator:ga31710ba9a7d42a9503a33149fa0b06e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8df829fe1b522f576cc8d97835c0a64a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga8df829fe1b522f576cc8d97835c0a64a">wifi_station_set_reconnect_policy</a> (bool set)</td></tr>
<tr class="memdesc:ga8df829fe1b522f576cc8d97835c0a64a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set whether the ESP8266 station will reconnect to the AP after disconnection. It will do so by default.  <a href="#ga8df829fe1b522f576cc8d97835c0a64a">More...</a><br /></td></tr>
<tr class="separator:ga8df829fe1b522f576cc8d97835c0a64a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga759708bdf7cbb858a9b5c87100ccd4f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__Station__APIs.html#ga4c23fd73def991ebbce2a16bf7d474bc">STATION_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga759708bdf7cbb858a9b5c87100ccd4f8">wifi_station_get_connect_status</a> (void)</td></tr>
<tr class="memdesc:ga759708bdf7cbb858a9b5c87100ccd4f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the connection status of the ESP8266 WiFi station.  <a href="#ga759708bdf7cbb858a9b5c87100ccd4f8">More...</a><br /></td></tr>
<tr class="separator:ga759708bdf7cbb858a9b5c87100ccd4f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b52a9b584de66a3806ec340e3e5c909"><td class="memItemLeft" align="right" valign="top">uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga0b52a9b584de66a3806ec340e3e5c909">wifi_station_get_current_ap_id</a> (void)</td></tr>
<tr class="memdesc:ga0b52a9b584de66a3806ec340e3e5c909"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the information of APs (5 at most) recorded by ESP8266 station.  <a href="#ga0b52a9b584de66a3806ec340e3e5c909">More...</a><br /></td></tr>
<tr class="separator:ga0b52a9b584de66a3806ec340e3e5c909"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9711fca72415e7894c33ae4cef1d371d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga9711fca72415e7894c33ae4cef1d371d">wifi_station_ap_change</a> (uint8 current_ap_id)</td></tr>
<tr class="memdesc:ga9711fca72415e7894c33ae4cef1d371d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch the ESP8266 station connection to a recorded AP.  <a href="#ga9711fca72415e7894c33ae4cef1d371d">More...</a><br /></td></tr>
<tr class="separator:ga9711fca72415e7894c33ae4cef1d371d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63e11de2570080b8379da8625e9cb949"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga63e11de2570080b8379da8625e9cb949">wifi_station_ap_number_set</a> (uint8 ap_number)</td></tr>
<tr class="memdesc:ga63e11de2570080b8379da8625e9cb949"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of APs that can be recorded in the ESP8266 station. When the ESP8266 station is connected to an AP, the SSID and password of the AP will be recorded.  <a href="#ga63e11de2570080b8379da8625e9cb949">More...</a><br /></td></tr>
<tr class="separator:ga63e11de2570080b8379da8625e9cb949"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8e02856a8da8a5c2d5cc2b58ac2abe8d"><td class="memItemLeft" align="right" valign="top">uint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga8e02856a8da8a5c2d5cc2b58ac2abe8d">wifi_station_get_ap_info</a> (struct <a class="el" href="structstation__config.html">station_config</a> config[])</td></tr>
<tr class="memdesc:ga8e02856a8da8a5c2d5cc2b58ac2abe8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the information of APs (5 at most) recorded by ESP8266 station.  <a href="#ga8e02856a8da8a5c2d5cc2b58ac2abe8d">More...</a><br /></td></tr>
<tr class="separator:ga8e02856a8da8a5c2d5cc2b58ac2abe8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8572ea9f6e1b7785e9df6941932bb3d"><td class="memItemLeft" align="right" valign="top">sint8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gaf8572ea9f6e1b7785e9df6941932bb3d">wifi_station_get_rssi</a> (void)</td></tr>
<tr class="memdesc:gaf8572ea9f6e1b7785e9df6941932bb3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get rssi of the AP which ESP8266 station connected to.  <a href="#gaf8572ea9f6e1b7785e9df6941932bb3d">More...</a><br /></td></tr>
<tr class="separator:gaf8572ea9f6e1b7785e9df6941932bb3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8319ad450244b7742b85150adc3cd424"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga8319ad450244b7742b85150adc3cd424">wifi_station_dhcpc_start</a> (void)</td></tr>
<tr class="memdesc:ga8319ad450244b7742b85150adc3cd424"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the ESP8266 station DHCP client.  <a href="#ga8319ad450244b7742b85150adc3cd424">More...</a><br /></td></tr>
<tr class="separator:ga8319ad450244b7742b85150adc3cd424"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga955438bce6a3cdfc702d032f4d086704"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga955438bce6a3cdfc702d032f4d086704">wifi_station_dhcpc_stop</a> (void)</td></tr>
<tr class="memdesc:ga955438bce6a3cdfc702d032f4d086704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the ESP8266 station DHCP client.  <a href="#ga955438bce6a3cdfc702d032f4d086704">More...</a><br /></td></tr>
<tr class="separator:ga955438bce6a3cdfc702d032f4d086704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f0dbe9ff0d79cd8d947f9ff23bc747a"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__Misc__APIs.html#ga9e40444d24f71f875b15136edec8fc47">dhcp_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#ga4f0dbe9ff0d79cd8d947f9ff23bc747a">wifi_station_dhcpc_status</a> (void)</td></tr>
<tr class="memdesc:ga4f0dbe9ff0d79cd8d947f9ff23bc747a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the ESP8266 station DHCP client status.  <a href="#ga4f0dbe9ff0d79cd8d947f9ff23bc747a">More...</a><br /></td></tr>
<tr class="separator:ga4f0dbe9ff0d79cd8d947f9ff23bc747a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaed5b5cb8eb9d881a77ca4a832b9ae50d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gaed5b5cb8eb9d881a77ca4a832b9ae50d">wifi_station_set_hostname</a> (char *name)</td></tr>
<tr class="memdesc:gaed5b5cb8eb9d881a77ca4a832b9ae50d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set ESP8266 station DHCP hostname.  <a href="#gaed5b5cb8eb9d881a77ca4a832b9ae50d">More...</a><br /></td></tr>
<tr class="separator:gaed5b5cb8eb9d881a77ca4a832b9ae50d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadfca0ed0d87c94c27168a826bcc88b54"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Station__APIs.html#gadfca0ed0d87c94c27168a826bcc88b54">wifi_station_get_hostname</a> (void)</td></tr>
<tr class="memdesc:gadfca0ed0d87c94c27168a826bcc88b54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get ESP8266 station DHCP hostname.  <a href="#gadfca0ed0d87c94c27168a826bcc88b54">More...</a><br /></td></tr>
<tr class="separator:gadfca0ed0d87c94c27168a826bcc88b54"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>ESP8266 station APIs. </p>
<dl class="section attention"><dt>Attention</dt><dd>To call APIs related to ESP8266 station has to enable station mode first (wifi_set_opmode) </dd></dl>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga953373c37a80c04a576ac03986a1ebfb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(*  scan_done_cb_t) (void *arg, STATUS status)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function for wifi_station_scan. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">void</td><td>*arg : information of APs that are found; save them as linked list; refer to struct <a class="el" href="structbss__info.html">bss_info</a> </td></tr>
    <tr><td class="paramname">STATUS</td><td>status : status of scanning</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>null </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga4c23fd73def991ebbce2a16bf7d474bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__Station__APIs.html#ga4c23fd73def991ebbce2a16bf7d474bc">STATION_STATUS</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bca27894ff65729ce4cf0a322e2e3a71c04"></a>STATION_IDLE&#160;</td><td class="fielddoc">
<p>ESP8266 station idle </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bcaff0fbe033edf483a60063bdfcf1e39b9"></a>STATION_CONNECTING&#160;</td><td class="fielddoc">
<p>ESP8266 station is connecting to AP </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bcaa9d77c934ee5b916f3ff0743204f3d7a"></a>STATION_WRONG_PASSWORD&#160;</td><td class="fielddoc">
<p>the password is wrong </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bca95a3d4b77c93e76281ff5355f24acfd0"></a>STATION_NO_AP_FOUND&#160;</td><td class="fielddoc">
<p>ESP8266 station can not find the target AP </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bca25d788a7722116d2bf2b26bb6402d118"></a>STATION_CONNECT_FAIL&#160;</td><td class="fielddoc">
<p>ESP8266 station fail to connect to AP </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="gga4c23fd73def991ebbce2a16bf7d474bca6df279173c26c3e7b1c65fdd41b50889"></a>STATION_GOT_IP&#160;</td><td class="fielddoc">
<p>ESP8266 station got IP address from AP </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga9711fca72415e7894c33ae4cef1d371d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_ap_change </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>current_ap_id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Switch the ESP8266 station connection to a recorded AP. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8</td><td>new_ap_id : AP's record id, start counting from 0.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga63e11de2570080b8379da8625e9cb949"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_ap_number_set </td>
          <td>(</td>
          <td class="paramtype">uint8&#160;</td>
          <td class="paramname"><em>ap_number</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of APs that can be recorded in the ESP8266 station. When the ESP8266 station is connected to an AP, the SSID and password of the AP will be recorded. </p>
<dl class="section attention"><dt>Attention</dt><dd>This configuration will be saved in the Flash system parameter area if changed.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8</td><td>ap_number : the number of APs that can be recorded (MAX: 5)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gab03cd1e7e4ad93cd241c94bd57430384"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_connect </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect the ESP8266 WiFi station to the AP. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. This API should be called when the ESP8266 station is enabled, and the system initialization is completed. Do not call this API in user_init. </dd>
<dd>
2. If the ESP8266 is connected to an AP, call wifi_station_disconnect to disconnect.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga8319ad450244b7742b85150adc3cd424"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_dhcpc_start </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the ESP8266 station DHCP client. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. The DHCP is enabled by default. </dd>
<dd>
2. The DHCP and the static IP API ((wifi_set_ip_info)) influence each other, and if the DHCP is enabled, the static IP will be disabled; if the static IP is enabled, the DHCP will be disabled. It depends on the latest configuration.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga4f0dbe9ff0d79cd8d947f9ff23bc747a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__Misc__APIs.html#ga9e40444d24f71f875b15136edec8fc47">dhcp_status</a> wifi_station_dhcpc_status </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the ESP8266 station DHCP client status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>enum dhcp_status </dd></dl>

</div>
</div>
<a class="anchor" id="ga955438bce6a3cdfc702d032f4d086704"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_dhcpc_stop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disable the ESP8266 station DHCP client. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. The DHCP is enabled by default. </dd>
<dd>
2. The DHCP and the static IP API ((wifi_set_ip_info)) influence each other, and if the DHCP is enabled, the static IP will be disabled; if the static IP is enabled, the DHCP will be disabled. It depends on the latest configuration.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gaba69e9646b1f29d8a72972787400f4f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_disconnect </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disconnect the ESP8266 WiFi station from the AP. </p>
<dl class="section attention"><dt>Attention</dt><dd>This API should be called when the ESP8266 station is enabled, and the system initialization is completed. Do not call this API in user_init.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga8e02856a8da8a5c2d5cc2b58ac2abe8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8 wifi_station_get_ap_info </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structstation__config.html">station_config</a>&#160;</td>
          <td class="paramname"><em>config</em>[]</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the information of APs (5 at most) recorded by ESP8266 station. </p>
<p>Example: </p><pre> 
        struct <a class="el" href="structstation__config.html">station_config</a> config[5];
        nt i = wifi_station_get_ap_info(config);
</pre><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> config[] : information of the APs, the array size should be 5.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of APs recorded. </dd></dl>

</div>
</div>
<a class="anchor" id="ga00570be3792df2117fabaf78f1715377"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_get_auto_connect </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the ESP8266 station will connect to the recorded AP automatically when the power is on. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : connect to the AP automatically </dd>
<dd>
false : not connect to the AP automatically </dd></dl>

</div>
</div>
<a class="anchor" id="ga1f0be53caaf81058292a1e6559bdaa36"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_get_config </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structstation__config.html">station_config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current configuration of the ESP8266 WiFi station. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> *config : ESP8266 station configuration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga6731bedbb516f8709c236084fa721dd4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_get_config_default </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structstation__config.html">station_config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the configuration parameters saved in the Flash of the ESP8266 WiFi station. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> *config : ESP8266 station configuration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga759708bdf7cbb858a9b5c87100ccd4f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__Station__APIs.html#ga4c23fd73def991ebbce2a16bf7d474bc">STATION_STATUS</a> wifi_station_get_connect_status </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the connection status of the ESP8266 WiFi station. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the status of connection </dd></dl>

</div>
</div>
<a class="anchor" id="ga0b52a9b584de66a3806ec340e3e5c909"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8 wifi_station_get_current_ap_id </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the information of APs (5 at most) recorded by ESP8266 station. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> config[] : information of the APs, the array size should be 5.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of APs recorded. </dd></dl>

</div>
</div>
<a class="anchor" id="gadfca0ed0d87c94c27168a826bcc88b54"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* wifi_station_get_hostname </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get ESP8266 station DHCP hostname. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the hostname of ESP8266 station </dd></dl>

</div>
</div>
<a class="anchor" id="ga31710ba9a7d42a9503a33149fa0b06e8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_get_reconnect_policy </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check whether the ESP8266 station will reconnect to the AP after disconnection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gaf8572ea9f6e1b7785e9df6941932bb3d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sint8 wifi_station_get_rssi </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get rssi of the AP which ESP8266 station connected to. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">null</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>31 : fail, invalid value. </dd>
<dd>
others : succeed, value of rssi. In general, rssi value &lt; 10 </dd></dl>

</div>
</div>
<a class="anchor" id="gac80b0607b1cb20c161c681581c998626"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_scan </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structscan__config.html">scan_config</a> *&#160;</td>
          <td class="paramname"><em>config</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__Station__APIs.html#ga953373c37a80c04a576ac03986a1ebfb">scan_done_cb_t</a>&#160;</td>
          <td class="paramname"><em>cb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scan all available APs. </p>
<dl class="section attention"><dt>Attention</dt><dd>This API should be called when the ESP8266 station is enabled, and the system initialization is completed. Do not call this API in user_init.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structscan__config.html">scan_config</a> *config : configuration of scanning </td></tr>
    <tr><td class="paramname">struct</td><td>scan_done_cb_t cb : callback of scanning</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga814fa9c0218cd4c1df29b4d22aeef442"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_set_auto_connect </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>set</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set whether the ESP8266 station will connect to the recorded AP automatically when the power is on. It will do so by default. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. If this API is called in user_init, it is effective immediately after the power is on. If it is called in other places, it will be effective the next time when the power is on. </dd>
<dd>
2. This configuration will be saved in Flash system parameter area if changed.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bool</td><td>set : If it will automatically connect to the AP when the power is on<ul>
<li>true : it will connect automatically</li>
<li>false: it will not connect automatically</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gab3699b2e258bf21ad6e85e4b1ec1c271"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_set_config </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structstation__config.html">station_config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the configuration of the ESP8266 station and save it to the Flash. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. This API can be called only when the ESP8266 station is enabled. </dd>
<dd>
2. If wifi_station_set_config is called in user_init , there is no need to call wifi_station_connect. The ESP8266 station will automatically connect to the AP (router) after the system initialization. Otherwise, wifi_station_connect should be called. </dd>
<dd>
3. Generally, <a class="el" href="structstation__config.html#ab8bd65a9dba6168d9a62bb54a67d1f50">station_config.bssid_set</a> needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. </dd>
<dd>
4. This configuration will be saved in the Flash system parameter area if changed.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> *config : ESP8266 station configuration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gafd1188add491eee183d4ee2daa37dca6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_set_config_current </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structstation__config.html">station_config</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the configuration of the ESP8266 station. And the configuration will not be saved to the Flash. </p>
<dl class="section attention"><dt>Attention</dt><dd>1. This API can be called only when the ESP8266 station is enabled. </dd>
<dd>
2. If wifi_station_set_config_current is called in user_init , there is no need to call wifi_station_connect. The ESP8266 station will automatically connect to the AP (router) after the system initialization. Otherwise, wifi_station_connect should be called. </dd>
<dd>
3. Generally, <a class="el" href="structstation__config.html#ab8bd65a9dba6168d9a62bb54a67d1f50">station_config.bssid_set</a> needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">struct</td><td><a class="el" href="structstation__config.html">station_config</a> *config : ESP8266 station configuration</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="gaed5b5cb8eb9d881a77ca4a832b9ae50d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_set_hostname </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set ESP8266 station DHCP hostname. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">char</td><td>*name : hostname of ESP8266 station</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
<a class="anchor" id="ga8df829fe1b522f576cc8d97835c0a64a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wifi_station_set_reconnect_policy </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>set</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set whether the ESP8266 station will reconnect to the AP after disconnection. It will do so by default. </p>
<dl class="section attention"><dt>Attention</dt><dd>If users want to call this API, it is suggested that users call this API in user_init.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bool</td><td>set : if it's true, it will enable reconnection; if it's false, it will disable reconnection.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true : succeed </dd>
<dd>
false : fail </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 1 2016 10:19:26 for ESP8266_RTOS_SDK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.10
</small></address>
</body>
</html>
